import {Injectable} from '@angular/core';
import {HttpClient} from "@angular/common/http";
import {Observable} from "rxjs";
import {Ranking} from "./ranking";

@Injectable({providedIn: 'root'})
export class RankingService {

  constructor(
    private http: HttpClient
  ) {
  }

  url = "http://localhost:3000/rank/getRankList"

  getHttpRankList(): Observable<Ranking[]> {
    return this.http.get<Ranking[]>(this.url)
  }
}
